lib/repo-pull: Use values from struct in enqueue_one_object_request()
authorPhilip Withnall <withnall@endlessm.com>
Tue, 22 May 2018 11:13:08 +0000 (12:13 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Fri, 25 May 2018 13:12:33 +0000 (13:12 +0000)
This introduces no functional changes, but will make some upcoming
refactoring a little easier.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #1599
Approved by: jlebon

src/libostree/ostree-repo-pull.c

index f5745f86603d71cf408950542f7a705ceab6422c..4410f9986e20f2d0f3597a1de4a6ac9d03122542 100644 (file)
@@ -1939,12 +1939,11 @@ enqueue_one_object_request (OtPullData                *pull_data,
     {
       g_debug ("queuing fetch of %s.%s%s", checksum,
                ostree_object_type_to_string (objtype),
-               is_detached_meta ? " (detached)" : "");
+               fetch_data->is_detached_meta ? " (detached)" : "");
 
       if (is_meta)
         {
-          GVariant *objname = ostree_object_name_serialize (checksum, objtype);
-          g_hash_table_insert (pull_data->pending_fetch_metadata, objname, fetch_data);
+          g_hash_table_insert (pull_data->pending_fetch_metadata, g_variant_ref (fetch_data->object), fetch_data);
         }
       else
         {